class MainPanel {
    private _view: fairygui.GComponent;
    private _backBtn: fairygui.GObject;
    private _demoContainer: fairygui.GComponent;
    private _cc: fairygui.Controller;

    private _demoObjects: any;

    public constructor() {
        this._view = fairygui.UIPackage.createObject("UIPack", "Menu").asCom;
        this._view.setSize(fairygui.GRoot.inst.width,fairygui.GRoot.inst.height);
        fairygui.GRoot.inst.addChild(this._view);

        this._backBtn = this._view.getChild("btn_startGame");
        this._backBtn.onClick(this, this.onClickBack);
    }
    
    private update():void {
        //this._view.getChild("n33").rotation+=5;
        //this._view.getChild("n34").displayObject.rotation+=5;
    }

    private onClickBack(evt: Event): void {
        console.log("开始游戏");
        //隐藏自己
        this._view.visible = false;
        //进入主游戏
        var a = new PlayTeeter();
        //Laya.stage.addChild(a);//换地方了
    }
}
